var router = getRouter();

function changecolor(color) {
	var body = document.body;
	body.style['background-color'] = color;
}

window.onload = function() {
	router.route('/', changecolor.bind(null, 'skyblue'));
	router.route('/orange', changecolor.bind(null, 'orange'));
	router.route('/pink', changecolor.bind(null, 'pink'));
	router.route('/colorful-font', function() {
		var p = document.getElementsByTagName('a');
		[].forEach.call(p, function(item) {
			item.style['color'] = '#' + ((~~(Math.random() * (1 << 24))).toString(16));
		})
	});
}